function y = function_stopping

global max_generation_num;

global generation_num;

if generation_num == max_generation_num
    
    y = 1;
    
else 
    
    y = 0;
    
end